package com.xuecheng.teaching.api;

import com.xuecheng.commons.model.dto.CommentListDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.vo.CommentListVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.commons.model.vo.WorkVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("xc-teaching-service")
public interface TeachingClient {
    @GetMapping("/work/{wordId}")
    public ResponseResult<WorkVo> findWordById(@PathVariable("wordId") Integer workId);
    //    根据id删除
    @DeleteMapping("/course-comment/{commentId}")
    ResponseResult delete(@PathVariable long commentId);

    @PostMapping("/course-comment/listAll")
    public ResponseResult<List<CommentListVo>> listAll(@RequestBody CommentListDto dto );

//    @PostMapping("/course-comment/list")
//    public ResponseResult<List<CommentListVo>> forcommentlist(@RequestBody CommentListDto dto , PageRequest request);
}
